require("common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "xg_o2o/personnel/personnel_order_pic" ], {
    "10b8": function(e, t, n) {
        "use strict";
        n.d(t, "b", function() {
            return r;
        }), n.d(t, "c", function() {
            return i;
        }), n.d(t, "a", function() {
            return o;
        });
        var o = {
            gracePage: function() {
                return n.e("graceUI/components/gracePage").then(n.bind(null, "1915"));
            },
            graceSelectImgAndUpload: function() {
                return Promise.all([ n.e("common/vendor"), n.e("graceUI/components/graceSelectImgAndUpload") ]).then(n.bind(null, "d7ef"));
            }
        }, r = function() {
            this.$createElement, this._self._c;
        }, i = [];
    },
    2176: function(e, t, n) {
        "use strict";
        n.r(t);
        var o = n("10b8"), r = n("982e");
        for (var i in r) "default" !== i && function(e) {
            n.d(t, e, function() {
                return r[e];
            });
        }(i);
        n("e13a");
        var a = n("f0c5"), s = Object(a.a)(r.default, o.b, o.c, !1, null, null, null, !1, o.a, void 0);
        t.default = s.exports;
    },
    "2aec": function(e, t, n) {
        "use strict";
        (function(e) {
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            n("4e1e"), t(n("66fd")), e(t(n("2176")).default);
        }).call(this, n("543d").createPage);
    },
    8261: function(e, t, n) {},
    "982e": function(e, t, n) {
        "use strict";
        n.r(t);
        var o = n("c242"), r = n.n(o);
        for (var i in o) "default" !== i && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(i);
        t.default = r.a;
    },
    c242: function(e, t, n) {
        "use strict";
        (function(e) {
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var o = n("b00d"), r = {
                data: function() {
                    return {
                        textareaVal: "",
                        selectedimgs: [],
                        subtxt: "提交",
                        uploadServerUrl: "",
                        orderId: 0,
                        perid: 0,
                        uploadImg: "",
                        uploadImgs: "",
                        imgnum: 1,
                        showBack: !1,
                        showother: 2
                    };
                },
                onLoad: function(e) {
                    var t = o.d;
                    "wx2285aa24a7029f46" != t && "wxcaad2fca5f5aeba1" != t || (this.showother = 1);
                    var n = getCurrentPages();
                    this.showBack = n.length > 1, this.uploadServerUrl = this.$xRequest.url("entry/wxapp/v4uploadimg"), 
                    this.orderId = e.orderid, this.perid = e.pid, this.detailData();
                },
                methods: {
                    imgsChange: function(e) {
                        this.uploadImgs = "", this.selectedimgs = e;
                    },
                    imgLoaded: function(e) {
                        var t = new Array();
                        if (this.subtxt = "提交中", e.length > 0) {
                            for (var n = 0; n < e.length; n++) t[n] = e[n].url;
                            var o = t.join(",");
                            console.log("提交中"), this.confirm(o);
                        } else this.confirm("");
                    },
                    uploaderror: function() {
                        console.log("上传过程遇到错误"), this.subtxt = "提交";
                    },
                    uploadOrder: function() {
                        if ("提交中" != this.subtxt) if ("" == this.uploadImgs) {
                            var t = "请上传至少" + this.imgnum + "张照片";
                            if (this.selectedimgs.length < this.imgnum) return e.showToast({
                                title: t,
                                icon: "none"
                            }), void (this.subtxt = "提交");
                            this.$refs.selectimgandupload.upload();
                        } else this.confirm(this.uploadImgs);
                    },
                    confirm: function(t) {
                        var n = this;
                        if (t) {
                            var o = this.$xSign.sign("v4personnel_orderdetail");
                            this.$xRequest.request({
                                url: "entry/wxapp/v4personnel_orderdetail",
                                data: {
                                    oid: this.orderId,
                                    op: "uploadimg",
                                    pid: this.perid,
                                    xgsign: o,
                                    img: t,
                                    textareaval: this.textareaVal
                                },
                                success: function(t) {
                                    var o = JSON.parse(n.$Decrypt(t.data.data));
                                    if (-1 == o.info) return e.showModal({
                                        title: "温馨提示",
                                        content: t.data.message,
                                        showCancel: !1,
                                        success: function(e) {
                                            e.confirm;
                                        }
                                    }), void (n.subtxt = "提交");
                                    0 == t.data.errno && 1 == o.info && (n.subtxt = "提交", e.showModal({
                                        title: "温馨提示",
                                        content: "提交成功",
                                        showCancel: !1,
                                        success: function(t) {
                                            t.confirm && e.navigateBack({
                                                delta: 2
                                            });
                                        }
                                    }));
                                }
                            });
                        } else e.showToast({
                            title: "请选择图片",
                            icon: "none"
                        });
                    },
                    detailData: function() {
                        var t = this;
                        this.graceFullLoading = !0;
                        var n = this.$xSign.sign("v4personnel_getinfo");
                        this.$xRequest.request({
                            url: "entry/wxapp/v4personnel_getinfo",
                            data: {
                                oid: this.orderId,
                                op: "detail",
                                pid: this.perid,
                                xgsign: n
                            },
                            success: function(n) {
                                var o = JSON.parse(t.$Decrypt(n.data.data));
                                if (t.graceFullLoading = !1, -1 != o.info) {
                                    if (0 == n.data.errno && 1 == o.info && (t.textareaVal = o.order.personneltxt, t.imgnum = o.imglimit, 
                                    o.order.personnelimg && (t.uploadImg = o.order.personnelimg ? o.order.personnelimg : "", 
                                    t.uploadImgs = o.order.personnelimg ? o.order.personnelimg : "", setTimeout(function() {
                                        t.$refs.selectimgandupload.setItems([ o.order.personnelimg ]);
                                    }, 200)), o.order.personnelimgs)) {
                                        t.uploadImgs = o.order.personnelimgs ? o.order.personnelimgs : "";
                                        var r = o.order.personnelimgs.split(",");
                                        setTimeout(function() {
                                            t.$refs.selectimgandupload.setItems(r);
                                        }, 300);
                                    }
                                } else e.showModal({
                                    title: "温馨提示",
                                    content: n.data.message,
                                    showCancel: !1,
                                    success: function(t) {
                                        t.confirm && e.navigateBack({
                                            delta: 1
                                        });
                                    }
                                });
                            }
                        });
                    }
                }
            };
            t.default = r;
        }).call(this, n("543d").default);
    },
    e13a: function(e, t, n) {
        "use strict";
        var o = n("8261");
        n.n(o).a;
    }
}, [ [ "2aec", "common/runtime", "common/vendor" ] ] ]);